$(function () {
    $('#btn').click(function () {
        var usernameVal = $('#email').val();
        var passwordVal = $('#password').val();
        var con = {email: usernameVal, password: passwordVal};
        $.post('../login', con, function (data) {
            var result = JSON.parse(data);
            if (result.message > 1) {
                window.location.href = "../view/myself.jsp";
            } else {
               alert("用户名或密码错误");

            }
        });
    });

});